<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libschc: jsmn.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libschc
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">jsmn.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="jsmn_8h_source.html">jsmn.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a0d7a964b95b65cd16699a355ede80394"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a0d7a964b95b65cd16699a355ede80394">jsmn_alloc_token</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser, <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *tokens, size_t num_tokens)</td></tr>
<tr class="memdesc:a0d7a964b95b65cd16699a355ede80394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a fresh unused token from the token pull.  <a href="jsmn_8c.html#a0d7a964b95b65cd16699a355ede80394">More...</a><br /></td></tr>
<tr class="separator:a0d7a964b95b65cd16699a355ede80394"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20b875e37a2a5c88888c6d80068715be"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a20b875e37a2a5c88888c6d80068715be">jsmn_fill_token</a> (<a class="el" href="structjsmntok__t.html">jsmntok_t</a> *token, <a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a> type, int start, int end)</td></tr>
<tr class="memdesc:a20b875e37a2a5c88888c6d80068715be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills token type and boundaries.  <a href="jsmn_8c.html#a20b875e37a2a5c88888c6d80068715be">More...</a><br /></td></tr>
<tr class="separator:a20b875e37a2a5c88888c6d80068715be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d1f29464811e2bbf5506fbe5c7ee9de"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a4d1f29464811e2bbf5506fbe5c7ee9de">jsmn_parse_primitive</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser, const char *js, size_t len, <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *tokens, size_t num_tokens)</td></tr>
<tr class="memdesc:a4d1f29464811e2bbf5506fbe5c7ee9de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills next available token with JSON primitive.  <a href="jsmn_8c.html#a4d1f29464811e2bbf5506fbe5c7ee9de">More...</a><br /></td></tr>
<tr class="separator:a4d1f29464811e2bbf5506fbe5c7ee9de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a568f184e45bb9718270088e1e05a4264"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a568f184e45bb9718270088e1e05a4264">jsmn_parse_string</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser, const char *js, size_t len, <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *tokens, size_t num_tokens)</td></tr>
<tr class="memdesc:a568f184e45bb9718270088e1e05a4264"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills next token with JSON string.  <a href="jsmn_8c.html#a568f184e45bb9718270088e1e05a4264">More...</a><br /></td></tr>
<tr class="separator:a568f184e45bb9718270088e1e05a4264"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a774f985a9750a10c7e88304e30191e03"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a774f985a9750a10c7e88304e30191e03">jsmn_parse</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser, const char *js, size_t len, <a class="el" href="structjsmntok__t.html">jsmntok_t</a> *tokens, unsigned int num_tokens)</td></tr>
<tr class="memdesc:a774f985a9750a10c7e88304e30191e03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse JSON string and fill tokens.  <a href="jsmn_8c.html#a774f985a9750a10c7e88304e30191e03">More...</a><br /></td></tr>
<tr class="separator:a774f985a9750a10c7e88304e30191e03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d4a8b3ce5c3d600feea38615b5f9aa6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">jsmn_init</a> (<a class="el" href="structjsmn__parser.html">jsmn_parser</a> *parser)</td></tr>
<tr class="memdesc:a8d4a8b3ce5c3d600feea38615b5f9aa6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new parser based over a given buffer with an array of tokens available.  <a href="jsmn_8c.html#a8d4a8b3ce5c3d600feea38615b5f9aa6">More...</a><br /></td></tr>
<tr class="separator:a8d4a8b3ce5c3d600feea38615b5f9aa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a0d7a964b95b65cd16699a355ede80394"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d7a964b95b65cd16699a355ede80394">&#9670;&nbsp;</a></span>jsmn_alloc_token()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="structjsmntok__t.html">jsmntok_t</a>* jsmn_alloc_token </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
          <td class="paramname"><em>parser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
          <td class="paramname"><em>tokens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>num_tokens</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allocates a fresh unused token from the token pull. </p>

</div>
</div>
<a id="a20b875e37a2a5c88888c6d80068715be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20b875e37a2a5c88888c6d80068715be">&#9670;&nbsp;</a></span>jsmn_fill_token()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void jsmn_fill_token </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
          <td class="paramname"><em>token</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="jsmn_8h.html#a065320719769f9dc1fbe30094e52802f">jsmntype_t</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Fills token type and boundaries. </p>

</div>
</div>
<a id="a8d4a8b3ce5c3d600feea38615b5f9aa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d4a8b3ce5c3d600feea38615b5f9aa6">&#9670;&nbsp;</a></span>jsmn_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void jsmn_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
          <td class="paramname"><em>parser</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new parser based over a given buffer with an array of tokens available. </p>
<p>Create JSON parser over an array of tokens. </p>

</div>
</div>
<a id="a774f985a9750a10c7e88304e30191e03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a774f985a9750a10c7e88304e30191e03">&#9670;&nbsp;</a></span>jsmn_parse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int jsmn_parse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
          <td class="paramname"><em>parser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>js</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
          <td class="paramname"><em>tokens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>num_tokens</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parse JSON string and fill tokens. </p>
<p>Run JSON parser. </p>

</div>
</div>
<a id="a4d1f29464811e2bbf5506fbe5c7ee9de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d1f29464811e2bbf5506fbe5c7ee9de">&#9670;&nbsp;</a></span>jsmn_parse_primitive()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int jsmn_parse_primitive </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
          <td class="paramname"><em>parser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>js</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
          <td class="paramname"><em>tokens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>num_tokens</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Fills next available token with JSON primitive. </p>

</div>
</div>
<a id="a568f184e45bb9718270088e1e05a4264"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a568f184e45bb9718270088e1e05a4264">&#9670;&nbsp;</a></span>jsmn_parse_string()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int jsmn_parse_string </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjsmn__parser.html">jsmn_parser</a> *&#160;</td>
          <td class="paramname"><em>parser</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>js</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structjsmntok__t.html">jsmntok_t</a> *&#160;</td>
          <td class="paramname"><em>tokens</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>num_tokens</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Fills next token with JSON string. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
